function loadstoragesession(name,value)
{
	if(typeof(sessionStorage[name]) == "undefined")
	{
		sessionStorage.setItem(name,value);
	}
	else
	{
		sessionStorage.removeItem(name);
		sessionStorage.setItem(name,value);
	}
}
function toggle(x,t) {
	document.getElementById(x).style.display = t;
}
function getQueryParams()
{
	var $_GET = {};
	document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g,function () {
		function decode(s) {
			return decodeURIComponent(s.split("+").join(" "));
		}
		$_GET[decode(arguments[1])] = decode(arguments[2]);
	});
	return $_GET;
}
function stockablestring(tab){
	var stringtab = "";
	for (i=0;i<tab.length-1;i++)
	{
		stringtab = stringtab+tab[i]+"|";
	}
	stringtab = stringtab+tab[tab.length-1];
	return stringtab;
}

function getElementsByName_iefix(tag, name) {
         // création d'une methode getbyname pour IE
         var elem = document.getElementsByTagName(tag);
         var arr = new Array();
         for(i = 0,iarr = 0; i < elem.length; i++) {
                  att = elem[i].getAttribute("name");
                  if(att == name) {
                           arr[iarr] = elem[i];
                           iarr++;
                  }
         }
         return arr;
}
function cleanChaineChart(chaine){
	var chaineRetour = chaine.replace(/[a-z]/g,'');
	chaineRetour = chaineRetour.replace(/[A-Z]/g,'');
	chaineRetour = chaineRetour.replace(/,/g,'.');
	chaineRetour = chaineRetour.replace(/[éèàâîôûêàìòùäëüÿïö %*-+="'()$¤£µ]/g,'');
	return chaineRetour;
}
